package com.hdy.javachatroomdemo.Model;

import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MessageMapper {
    //查询session_id对应的消息中的最后一条消息
    public Message queryLastMessage(int sessionId);

    //查询session_id对应的所有历史消息,并且要查出fromName
    public List<ShowMessage> queryAllShowMessage(int sessionId);

    //添加消息
    public int addMessage(Message message);
}
